<div id="content">
	<div class="row s_page_title">
		<sa-big-breadcrumbs [items]="['项目管理','小程序管理[随你运]','车辆认证管理']" icon="fa fa-smile-o"
			class="col-xs-12 col-sm-7 col-md-7 col-lg-4"></sa-big-breadcrumbs>
	</div>
	<sa-widgets-grid>
		<div class="s_table">
			<div sa-widget [editbutton]="false" color="darken" class="clearfix">
				<header><span class="widget-icon"> <i class="fa fa-table"></i> </span>
					<h2>车辆认证管理</h2>
				</header>
				<div>
					<div class="widget-body no-padding">
						<div class="page-header clearfix s_table_opreation">
							<div class="left page-header-btn" style="width: calc(100% - 230px);">

								<div class="top_module">
									<span class="module_text">认证人员</span>
									<div class="s_hover_box">
										<select class="select2" id="nameSelect2">
											<option value=''></option>
										</select>
										<div class="s_del_icon" (click)='delName()'>x</div>
									</div>
								</div>

								<div class="top_module top_module_box">
									<span class="module_text">手机号码</span>
									<div class="s_hover_box">
										<select class="select2" id="phoneSelect2">
											<option value=''></option>
										</select>
										<div class="s_del_icon" (click)='delPhone()'>x</div>
									</div>
								</div>

								<div class="top_module top_module_box">
									<span class="module_text">车牌号码</span>
									<div class="s_hover_box">
										<select class="select2" id="carNumberSelect2">
											<option value=''></option>
										</select>
										<div class="s_del_icon" (click)='delCarNumber()'>x</div>
									</div>
								</div>

								<div class="top_module top_module_box">
									<span class="top_module_label module_text">公司名称</span>
									<sa-company-tree companyTreeId="companyTree"
										(companySelected)="companySelected($event)"></sa-company-tree>
								</div>

								<div class="top_module top_module_box">
									<span class="top_module_label module_text">审核方式</span>
									<select name="" class="top_module_select" [(ngModel)]="tableParam.auditWay">
										<option value="">全部</option>
										<option value="0">暂未提交</option>
										<option value="1">系统审核</option>
										<option value="2">人工审核</option>
									</select>
								</div>

								<div class="top_module top_module_box">
									<span class="top_module_label module_text">审核状态</span>
									<select name="" class="top_module_select" [(ngModel)]="tableParam.auditStatus">
										<option value="">全部</option>
										<option value="4">认证中</option>
										<option value="1">暂未认证</option>
										<option value="2">认证成功</option>
										<option value="3">认证失败</option>
									</select>
								</div>

								<button class="btn btn-primary" (click)="tableSearch()">查询</button>
							</div>
							<!-- <div class="right top-search">
								<input type="text" [(ngModel)]="tableParam.searchKey" (change)="tableSearch()" class="search-input" placeholder="姓名">
								<span class="top-search-box">
									<button class="top-search-btn" type="button" (click)="tableSearch()"> <i class="fa fa-search"></i></button>
								</span>
							</div> -->
						</div>
						<div class="table_scroll">
							<table
								class="display dataTables responsive table table-striped table-bordered table-hover dataTable s_h5_table">
								<thead>
									<tr>
										<th>用户</th>
										<th>手机号码</th>
										<th>车牌号码</th>
										<th>设备ID</th>
										<th>车辆所属</th>
										<th>所属公司</th>
										<th>车头照片</th>
										<th>行驶证主页</th>
										<th>行驶证副页</th>
										<th>绑定时间</th>
										<th>认证时间</th>
										<th>审核方式</th>
										<th>审核状态</th>
										<th>审核人员</th>
										<th>审核时间</th>
										<th>更新人</th>
										<th>更新时间</th>
										<th>操作</th>
									</tr>
								</thead>
								<tbody>
									<tr *ngFor="let row of tableData">
										<td>{{row.name?row.name:row.nickName}}</td>
										<td>{{row.phone}}</td>
										<td>{{row.carNumber}}</td>
										<td>{{row.deviceId}}</td>
										<td>
											<span *ngIf="row.carOwner == 0">个人</span>
											<span *ngIf="row.carOwner == 1">车队</span>
										</td>
										<td>{{row.companyName}}</td>
										<td><button type="button" (click)="open_img(row,ImgModal,'carHeadImg')"
												*ngIf="row.carHeadImg != null && row.carHeadImg.length !=0">查看</button>
										</td>
										<td><button type="button" (click)="open_img(row,ImgModal,'drivingPermitOneImg')"
												*ngIf="row.drivingPermitOneImg != null && row.drivingPermitOneImg.length !=0">查看</button>
										</td>
										<td><button type="button" (click)="open_img(row,ImgModal,'drivingPermitTwoImg')"
												*ngIf="row.drivingPermitTwoImg != null && row.drivingPermitTwoImg.length !=0">查看</button>
										</td>
										<td>{{row.createTime}}</td>
										<td>{{row.uploadTime}}</td>
										<td>
											<span *ngIf="row.auditWay == 0">暂未提交</span>
											<span *ngIf="row.auditWay == 1">系统审核</span>
											<span *ngIf="row.auditWay == 2">人工审核</span>
										</td>
										<td>
											<span *ngIf="row.auditStatus == 1">暂未认证</span>
											<span *ngIf="row.auditStatus == 2" class="green">认证成功</span>
											<span *ngIf="row.auditStatus == 3" class="red">认证失败</span>
											<span *ngIf="row.auditStatus == 4">认证中</span>
										</td>

										<td>{{row.auditor}}</td>
										<td>{{row.auditTime}}</td>
										<td>{{row.updateName}}</td>
										<td>{{row.updateTime}}</td>
										<td>
											<button type="button" (click)="auditStatusRow(row,deviceControlModal)"
												*ngIf="row.auditWay != 0">审核</button>
											<button *ngIf="row.carOwner == 0" type="button" (click)="delRow(row)">刪除</button>
										</td>
									</tr>
								</tbody>
							</table>
						</div>
						<div class="table-fix clearfix">
							<paginator [totalRecords]="totalCount" [rows]="pageSize" [currentPage]="curPage - 1"
								(onPageChange)="paginate($event)"></paginator>
							<button type="button" class="btn default refresh_btn" (click)="refresh()"><i
									class="fa fa-refresh"></i></button>
						</div>
					</div>
				</div>
			</div>
		</div>
	</sa-widgets-grid>

	<!-- 图片查看   弹窗-->
	<section bsModal #ImgModal="bs-modal" class="modal fade" tabindex="-1" role="dialog"
		aria-labelledby="myLargeModalLabel" aria-hidden="true">
		<div class="modal-dialog modal-lg" style="width: 1000px;">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" (click)="imgClose(ImgModal)" aria-label="Close"><span
							aria-hidden="true">&times;</span></button>
					<h4 class="modal-title">图片</h4>
				</div>
				<div class="modal-body">
					<div class="row form-horizontal imagesInfo">
						<div class="imagesList">
							<div *ngFor="let item of imgInfo" class="imagesList-cont">
								<div class="imgList">
									<div class="imgCont">
										<img class="imgSrc" [src]="item" alt="" (click)="bigimg(ImgBigModal,item)" />
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</section>
	<!-- 图片查看 弹窗end-->
	<!-- 图片放大查看   弹窗-->
	<section bsModal #ImgBigModal="bs-modal" class="modal fade imgView" tabindex="-1" role="dialog"
		aria-labelledby="myLargeModalLabel" aria-hidden="true">
		<!-- <div class="closeImg" (click)="CloseBigImg(ImgBigModal)"></div> -->
		<div class="modal-content modal-imgContent" (click)="CloseBigImg(ImgBigModal)">
			<img [src]="bigImg" />
		</div>
	</section>
	<!-- 图片放大查看 弹窗end-->
	<!--    审核弹窗-->
	<section bsModal #deviceControlModal="bs-modal" class="modal fade" tabindex="-1" role="dialog"
		aria-labelledby="myLargeModalLabel" aria-hidden="true">
		<div class="modal-dialog modal-lg">
			<div class="modal-content">
				<div class="modal-header">
					<button type="button" class="close" (click)="modalClose(deviceControlModal)"
						aria-label="Close"><span aria-hidden="true">&times;</span></button>
					<h4 class="modal-title"> 新增审核内容</h4>
				</div>
				<form id="deviceControlFrom" class="form-horizontal" role="form" novalidate="novalidate"
					[saBootstrapValidator]="validatorOptions">
					<div class="modal-body">
						<div class="row form-horizontal">
							<div class="form-group col-xs-12">
								<label class="col-xs-3 control-label">审核状态<sup>*</sup></label>
								<div class="col-xs-9">
									<label class="radio radio-inline" style="margin-right: 40px;">
										<input type="radio" class="radiobox" checked
											[(ngModel)]='deviceControlFrom.auditStatus'
											(change)="auditStatusChange($event.target.value)" value='2' name="modal1">
										<span>审核通过</span>
									</label>
									<label class="radio radio-inline" style="margin-right: 40px;">
										<input type="radio" class="radiobox" [(ngModel)]='deviceControlFrom.auditStatus'
											(change)="auditStatusChange($event.target.value)" value='3' name="modal2">
										<span>审核不通过</span>
									</label>
								</div>
							</div>
						</div>
					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-default"
							(click)="modalClose(deviceControlModal)">取消</button>
						<button type="button" class="btn btn-primary"
							(click)="deviceControlSubmit(deviceControlModal)">确认</button>
					</div>
				</form>
			</div>
		</div>
	</section>
	<!--  弹窗end-->
</div>

<style>
	.imgPhoto {
		width: 30px;
	}

	.select2-search__field {
		width: 100% !important;
	}

	/* .hang div{
		display: inline-block;
		width: 28%;
		text-align: center;
		border-top: 1px solid #ddd;
		border-bottom: 1px solid #ddd;
		border-right: 1px solid #ddd;
		height: 40px;
		line-height: 40px;
		font-weight: bold;
		background-color: #eee;
	}
	.hang div:first-child{
		border-left: 1px solid #ddd;
	}
	.lie ul:nth-child(2n+1) li{
		background-color: #eee;
	}
	.lie ul li{
		display: inline-block;
		width: 28%;
		text-align: center;
		height: 40px;
		line-height: 40px;
		border-bottom: 1px solid #ddd;
		border-right: 1px solid #ddd;
	}
	.lie ul li span{
		height: 40px;
		line-height: 40px;
		width: 100%;
	}
	.lie ul li:first-child{
		border-left: 1px solid #ddd;
	}
	.hang .lastDiv,.lie ul .lastDiv{
		width: 15%;
	} */
</style>